﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Odd or Even</title>
	<link href="js-console.css" rel="stylesheet" />
	<!--1. Write an expression that checks if given integer is odd or even.-->
</head>
<body>
	<div id="js-console"></div>
	<script src="js-console.js"></script>
	<script>
		var input = prompt("Enter integer value");
		var result;

		if (!isNaN(input)) {
			result = (input % 2) ? "odd" : "even";
		}
		else {
			result = '"Not a Number"';
		}

		jsConsole.writeLine("The number is " + result + ".");
	</script>
</body>
</html>
